<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>请客吃饭</title>
</head>
<body>
    <script>
        //1.输入框获取数值
        var money=Number(prompt('接收班长口袋里的钱数是：'));
        //2.根据不同的钱数阶段划分
        if(money>=2000){
            alert('请大家吃西餐');
        }else if(money>=1500){
            alert('请大家吃快餐');
        }else if(money>=1000){
            alert('请大家喝饮料');
        }else if(money>=500){
            alert('请大家吃棒棒糖');
        }else{
            alert('班长下次把钱带够');
        }
    </script>
</body>
</html>